package com.ss.android.article.base.feature.detail2.article.a;

import android.content.Intent;
import android.net.Uri;
import android.view.View;

import com.bytedance.article.common.c.TTUtils;
import com.ss.android.article.base.feature.detail.model.WebInfo;
import com.ss.android.newmedia.activity.browser.BrowserActivity;

final class h implements View.OnClickListener {
    private final NewDetailPageExtra b;
    private final WebInfo a;

    h(NewDetailPageExtra arg1, WebInfo arg2) {
        this.b = arg1;
        this.a = arg2;
    }

    public final void onClick(View arg4) {
        if(TTUtils.isValidUrl(this.a.webUrl)) {
            Intent v0 = new Intent(this.b.mActivity, BrowserActivity.class);
            v0.putExtra("title", this.a.webTitle);
            v0.setData(Uri.parse(this.a.webUrl));
            this.b.mActivity.startActivity(v0);
        }
        else {
            this.b.mActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(this.a.webUrl)));
        }
    }
}

